package com.jokesoft.supermanager.common.save;

import java.util.List;

import com.jokesoft.supermanager.common.services.PersonServiceRequest;

public class ClientSavePersonDataRequest extends PersonServiceRequest {

    private List<String> addresses;

    public ClientSavePersonDataRequest(String firstName, String lastName, String role, List<String> addresses) {
        super(firstName, lastName, role);

        this.addresses = addresses;
    }

    public List<String> getAddresses() {
        return addresses;
    }

    public void setAddresses(List<String> addresses) {
        this.addresses = addresses;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = super.hashCode();
        result = prime * result + ((addresses == null) ? 0 : addresses.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (!super.equals(obj))
            return false;
        if (getClass() != obj.getClass())
            return false;
        ClientSavePersonDataRequest other = (ClientSavePersonDataRequest) obj;
        if (addresses == null) {
            if (other.addresses != null)
                return false;
        } else if (!addresses.equals(other.addresses))
            return false;
        return true;
    }

    @Override
    public String toString() {
        return "ClientSavePersonDataRequest [addresses=" + addresses + "]";
    }

}
